package com.house.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author: GGP
 * @description: 房源实体类
 * @time: 2023-04-12 10:04
 **/
@Getter
@Setter
@Entity
@Table(name = "house")
@ApiModel
public class House extends CommonProperties{

	/** 房屋标题 */
	@ApiModelProperty(value = "房屋标题",name = "houseTitle",required = true)
	@Column(name = "house_title")
	private String houseTitle;

	/** 房屋规格（几室几厅） */
	@ApiModelProperty(value = "房屋规格",name = "houseModel",required = true)
	@Column(name = "house_model")
	private String houseModel;

	/** 房屋简介 */
	@ApiModelProperty(value = "房屋简介",name = "houseDesc",required = true)
	@Column(name = "house_desc")
	private String houseDesc;

	/** 房屋面积 */
	@ApiModelProperty(value = "房屋面积",name = "houseArea",required = true)
	@Column(name = "house_area")
	private Integer houseArea;

	/** 房屋总楼层 */
	@ApiModelProperty(value = "房屋总楼层",name = "houseFloor",required = true)
	@Column(name = "house_floor")
	private Integer houseFloor;

	/** 装修风格 */
	@ApiModelProperty(value = "装修风格",name = "houseStyle",required = true)
	@Column(name = "house_style")
	private String houseStyle;

	/** 出租方式 */
	@ApiModelProperty(value = "出租方式",name = "houseType",required = true)
	@Column(name = "house_type")
	private String houseType;

	/** 所在城市 */
	@ApiModelProperty(value = "所在城市",name = "houseCity",required = true)
	@Column(name = "house_city")
	private Integer houseCity;

	/** 房屋详细地址 */
	@ApiModelProperty(value = "房屋详细地址",name = "houseAddress",required = true)
	@Column(name = "house_address")
	private String houseAddress;

	/** 小区名称 */
	@ApiModelProperty(value = "小区名字",name = "communityName",required = true)
	@Column(name = "community_name")
	private String communityName;

	/** 价格 */
	@ApiModelProperty(value = "价格",name = "price",required = true)
	@Column(name = "price")
	private Integer price;

	/** 房屋朝向 */
	@ApiModelProperty(value = "房屋朝向",name = "houseOriented",required = true)
	@Column(name = "house_oriented")
	private String houseOriented;

	/** 房东联系方式 */
	@ApiModelProperty(value = "房东联系方式",name = "publisherPhone",required = true)
	@Column(name = "publisher_phone")
	private String publisherPhone;

	/** 房东id */
	@ApiModelProperty(value = "房东id",name = "publisherId",required = true)
	@Column(name = "publisher_id")
	private Integer publisherId;

	/** 房屋简介照片 */
	@ApiModelProperty(value = "房屋简介照片",name = "houseImage",required = true)
	@Column(name = "house_image")
	private String houseImage;

	/** 发布时间 */
	@ApiModelProperty(value = "发布时间",name = "publishTime",required = true)
	@Column(name = "publish_time")
	@CreatedDate
	private Date publishTime;

	/** 好评 (0-5):表示0-5星 */
	@ApiModelProperty(value = "评分",name = "score",required = true)
	@Column(name = "score")
	private Integer score;


}
